﻿using System;
using System.Threading.Tasks;

namespace Loong.Threading.Locks
{
    public interface ILockFactory : IDisposable
    {
        string GetOrCreateOwner();
        Task<ILock> LockAsync(string resource, string owner);
        Task<ILock> LockAsync(string resource, string owner, TimeSpan expiryTime);
    }
}
